#ifndef _REG_H
#define _REG_H

#define REG_EXPR_RET        ESI
#define COMMON_REG_NUM      5
#define REG_STATCK_DEPTH    32

enum
{
  EAX,
  EDX,
  EBX,
  ECX,
  EDI,
  ESI,/*for reg ret*/  
  EBP,
  ESP,
  REG_SIZE,
};

struct reg_set
{
  int reg;
  int offset;
};

struct reg_status
{
  int reg;
  int status;/*0 is not overflow,1 is overflow--reg is on the stack*/
};

extern char *reg_name[REG_SIZE];

int get_reg();
int get_specified_reg(int reg);
int get_div_reg();
int free_reg(int reg);
void clear_reg_bit_set();

#endif
